VERSION 5.00
Begin VB.Form MainFrm 
   BackColor       =   &H00008000&
   Caption         =   "Sandbox"
   ClientHeight    =   10245
   ClientLeft      =   120
   ClientTop       =   450
   ClientWidth     =   9600
   LinkTopic       =   "Form1"
   ScaleHeight     =   683
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   640
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton Command1 
      Caption         =   "Command1"
      Height          =   375
      Left            =   6960
      TabIndex        =   1
      Top             =   9720
      Width           =   375
   End
   Begin VB.PictureBox View 
      BorderStyle     =   0  'None
      Height          =   9600
      Left            =   0
      ScaleHeight     =   581.818
      ScaleMode       =   0  'User
      ScaleWidth      =   640
      TabIndex        =   0
      Top             =   0
      Width           =   9600
   End
End
Attribute VB_Name = "MainFrm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Private Sub Command1_Click()
Dim i As String: i = EntityMgr.AddPlayer("Clone")
EntityMgr.Entities(i).X = EntityMgr.Entities(Plr).X: EntityMgr.Entities(i).Y = EntityMgr.Entities(Plr).Y
End Sub

Private Sub Form_Unload(Cancel As Integer)
End
End Sub



Private Sub View_KeyUp(KeyCode As Integer, Shift As Integer)
Dim X, Y As Integer
With EntityMgr.Entities(Plr)
Select Case LastDir
Case 2 ^ 0: X = Round(.X + 0.2): Y = Round(.Y)
Case 2 ^ 1: X = Round(.X): Y = Round(.Y + 0.2)
Case 2 ^ 2: X = Round(.X - 0.2): Y = Round(.Y)
Case 2 ^ 3: X = Round(.X): Y = Round(.Y - 0.2)
End Select
End With

If KeyCode = vbKeySpace Then
If WithinBounds(X, Y) Then If Grid.GetTile(X, Y) = 3 Then Grid.SetTile(X, Y) = 4
End If

If KeyCode = vbKeyF Then
If WithinBounds(X, Y) Then If Grid.GetTile(X, Y) = 3 Then FireGrid(X, Y) = GetTick

If EntityMgr.Entities.Count Then
Dim Entity As EntityBaseClass
For Each Entity In EntityMgr.Entities
With Entity
If X = Round(.X) And Y = Round(.Y) And (Not Entity Is EntityMgr.Entities(Plr)) Then
Entity.Ignite
End If
End With
Next

End If

End If

                
End Sub
